<extend name="Public/base-kong"/>
<block name="nav">
   <include file="nav"/>
</block>
<block name="body">
<style>

.main-content{ margin-left:0}
</style>

<form class="well form-search" method="get" action="">
    <div class="search_type cc mb10">
      <div class="mb10"> 
        <span class="mr20">分类：
      
        &nbsp;&nbsp;时间：
        <input type="text" name="start_time" class=" J_date" value="{$Think.get.start_time}" style="width:120px;">-<input type="text" class="J_date" name="end_time" value="{$Think.get.end_time}" style="width:120px;" >
        
        <!-- 
        <select class="select_2" name="searchtype" style="width:70px;">
          <option value='0' >标题</option>
        </select>
         -->
               &nbsp; &nbsp;关键字：
        <input type="text" class="input length_2" name="keyword" style="width:200px;" value="{$Think.get.keyword}" placeholder="请输入关键字...">
        <input type="hidden" name="catid" value="{$cate.id}">
        <input type="submit" class="btn btn-sm btn-info" value="搜索"/>
        </span>
      </div>
    </div>
  </form>
  
  <form class="J_ajaxForm" action="" method="post">
    <div class="table_list">
       <table class="table table-striped  table-hover" >
        <thead>
	          <tr>
	            <th width="16"><label><input type="checkbox" class="check-all"></label></th>
	            <th width="50">排序</th>
	            <th width="30px">ID</th>
                <th width="40px"><if condition="$_GET[order] eq 'tui'"><a href="{:U("index",array("catid"=>$cate[id]))}">荐<i class=" icon-caret-down"></i></a><else/><a href="{:U("index",array("catid"=>$cate[id],"order"=>"tui"))}">荐</a></if></th>
               <th width="40px"><if condition="$_GET[order] eq 'top'"><a href="{:U("index",array("catid"=>$cate[id]))}">顶<i class="icon-caret-down"></i></a><else/><a href="{:U("index",array("catid"=>$cate[id],"order"=>"top"))}">顶</a></if></th>
                <th width="10px">图</th>
	            <th width="300">标题</th>
	            <th width="65"><if condition="$_GET[order] eq 'views'"><a href="{:U("index",array("catid"=>$cate[id]))}">点击<i class=" icon-caret-down"></i></a><else/><a href="{:U("index",array("catid"=>$cate[id],"order"=>"views"))}">点击</a></if></th>
	            <th width="80">UID</th>
	            <th class="hidden-md hidden-sm hidden-xs" width="160"><if condition="$_GET[order] eq 'inputtime'"><a href="{:U("index",array("catid"=>$cate[id]))}">发布时间<i class=" icon-caret-down"></i></a><else/><a href="{:U("index",array("catid"=>$cate[id],"order"=>"inputtime"))}">发布时间</a></if></th>
                 <th class="hidden-md hidden-sm hidden-xs" width="160"><if condition="$_GET[order] eq 'updatetime'"><a href="{:U("index",array("catid"=>$cate[id]))}">更新时间<i class=" icon-caret-down"></i></a><else/><a href="{:U("index",array("catid"=>$cate[id],"order"=>"updatetime"))}">更新时间</a></if></th>
	            <th width="60">状态</th>
	            <th width="160">操作</th>
	          </tr>
        </thead>
        	
        	<foreach name="list" item="vo">
	        	<tr>
		            <td><input type="checkbox" class="ids"  name="ids[]" value="{$vo.id}" ></td>
		            <td><input name='listorders[{$vo.id}]' class="input input-order"  type='text' size='3' value='{$vo.listorder}'></td>
		            <td><a>{$vo.id}</a></td>
                       <td>  <if condition="$vo[tui] eq 1">
        <a href="{:U("change",array("id"=>$vo['id'],"field"=>"tui","value"=>0))}" class="ajax-switch"> <i class="icon-check-circle"></i></a>
         <else/>
         <a href="{:U("change",array("id"=>$vo['id'],"field"=>"tui","value"=>1))}"  class="ajax-switch"><i class="icon-times-circle"></i></a>
         </if></td>
                             <td>  <if condition="$vo[top] eq 1">
        <a href="{:U("change",array("id"=>$vo['id'],"field"=>"top","value"=>0))}" class="ajax-switch"> <i class="icon-check-circle"></i></a>
         <else/>
         <a href="{:U("change",array("id"=>$vo['id'],"field"=>"top","value"=>1))}"  class="ajax-switch"><i class="icon-times-circle"></i></a>
         </if></td>
                             <td><if condition="$vo['thumb']"><i class="icon-picture-o"></if></td>
		            <td>
		            	<a href="{$vo.url}" target="_blank">
		            		<span>{$vo.title}</span>
		            	</a>
		            </td>
		            <td>{$vo.views}</td>
                  
    	         
		            <td>{$vo.uid}</td>
		            <td class="hidden-md hidden-sm hidden-xs">{$vo.inputtime|date="y-m-d H:i:s",###}</td>
                     <td class="hidden-md hidden-sm hidden-xs">{$vo.updatetime|date="y-m-d H:i:s",###}</td>
		            <td>
                    	{$vo.status|get_status_title}
                    
                    </td>
		            <td>
		            <!--	<a href="javascript:open_iframe_dialog('{:u('comment/commentadmin/index',array('post_id'=>$vo['id']))}','评论列表')">查看评论</a> |-->
		            	<a href="{:U('edit',array('id'=>$vo['id']))}">修改</a>|
		            	<a href="{:U('delete',array('id'=>$vo['id']))}" class="ajax-del" >删除</a>
					</td>
	          	</tr>
          </foreach>
          </table>
          <div class="pagination">{$Page}</div>
     
    </div>
    <div class="form-actions">
                    
        <button class="btn btn-primary ajax-post" type="submit" url="{:U('listorders')}" target-form="J_ajaxForm">排序</button>
     
   
        <button class="btn btn-primary ajax-post confirm" type="submit" url="{:U('delete')}" target-form="J_ajaxForm"   data-title="你确定删除吗？">删除</button>
      
      </div>
  </form>
  
  
  
  
</block>

